/**
 * @author wangxiaowei
 * 组织部发文列表
 */
var sort = null;
var grid = null;
function initgenzonglist(){
var useSealType = Ext.get('useSealType').getValue();
var title = null;
var path = null;
if(useSealType=='cer'){
   title = '证件跟踪';
   path = 'doc/cer/cerList.jsp';
}else if(useSealType=='copy'){
   title = '复印件跟踪';
   path = 'doc/copy/copyList.jsp';
}else if(useSealType=='ori'){
   title = '原件跟踪';
   path = 'doc/ori/oriList.jsp';
}
var colModel = new Ext.grid.ColumnModel([
		{header:'姓名',dataIndex:'username',menuDisabled : true},
		{header:'环节名称',dataIndex:'taskname',menuDisabled : true},
		{header:'完成时间',dataIndex:'time',menuDisabled : true}
	]);
	var url = Ext.get('url').getValue();
	sort = new Ext.data.JsonStore({
		url:url,
		fields:['username','taskname','time'],
		root:'root',
		totalProperty:'totalProperty'
	});
	var bbar = new Ext.PagingToolbar({
		pageSize:25,
		store:sort,
		displayInfo:true,
		emptyMsg:'没有记录'
	});
	
	 grid = new Ext.grid.GridPanel({
		title:title,
		cm:colModel,
		renderTo:'topic-grid',
		store:sort,
		loadMask:true,
		autoHeight:true,
		tbar:[{
			 text: '返回',
             iconCls: 'silk-add',
             handler:function(){
             	window.location.href=Ext.get('basePath').getValue()+path;
             }
		}],		
		bbar:bbar,
		viewConfig:{
			forceFit:true
		}
	});
	if(Ext.get('startid')){
		start = Ext.get('startid').getValue();
		sort.load({params:{start:0, limit: 25},callback:function(){
			grid.hide();
			bbar.hide();
			bbar.changePage(Ext.get('page').getValue());
			grid.show();
			bbar.show();
		}});
		return;
	}
	else
	{
		sort.load({params:{start:0, limit: 25}});
	}
}




	
	